﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ro.fortech.training.mvc.control;

namespace SilverlightView
{
    public partial class LoginScreen : UserControl
    {
        public LoginScreen()
        {
            InitializeComponent();
           
        }

        Controller control = new Controller();
        private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            
            NavigateController screen = new NavigateController();
            if (screen.ShowScreenStart(txtUsername.Text, passBoxPassword.Password))
                this.Content = new StartStopWork();
            else 
            {                
               TextBlock txtErrror= new TextBlock();
               txtErrror.Name = "txtError";
               txtErrror.Text = "Username or password incorrect!!";
               txtErrror.Height = 23;
               txtErrror.FontSize = 18;           
               LayoutRoot.Children.Add(txtErrror);                                                       
            }            
        }

        

        
    }
}
